/* Function type. */
typedef void *func_t;

/* Data type for links in the chain of symbols. */
struct symrec
{
char *name; /* name of symbol */
int type; /* type of symbol: either VAR or FNCT */
union
{
struct {
double var; /* value of a VAR */
int modifiable; /* is VAR modifiable? (0=>no, otherwise yes)*/
} vardef;
struct {
  func_t fnctptr; /* value of a FNCT  */
  char *proto;    /* prototype of a FNCT */
} fnct;
} value;
struct symrec *next; /* link field */
};
typedef struct symrec symrec;
/* The symbol table: a chain of ’struct symrec’. */
extern symrec *sym_table;
symrec *putsym (char const *, int);
symrec *getsym (char const *);
void symtable_make_VAR_persistent();
void symtable_revert();
symrec *for_assignment(symrec *);

/* Data type for argument list in function calls */
struct arglst_s {
  double arg;
  struct arglst_s *next;
};
typedef struct{
int stat;  // return status
double val;   // return value
} fnctres;
typedef struct arglst_s arglst_t;
arglst_t *create_arglst(double arg);
arglst_t *append_arg(arglst_t *arglst, double arg);
void discard_arglst(arglst_t *arglst);
fnctres fnctcall(symrec *fnctrec, arglst_t *arglst);

// Isn't it supposed to be exported by Bison with '%defines'?
void yyerror(char const*);
